package cn.mn.ac.demo.handler;

import com.aliyun.openservices.ons.api.OnExceptionContext;
import com.aliyun.openservices.ons.api.SendCallback;
import com.aliyun.openservices.ons.api.SendResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Component;

/**
 * @author 何福临
 * @date 2022-08-29 20:42
 */
@Slf4j
@Primary
@Component
public class MySendCallBackHandler implements SendCallback {

    @Override
    public void onSuccess(SendResult sendResult) {
        log.warn("自定义发送成功回调");
    }

    @Override
    public void onException(OnExceptionContext context) {
        log.warn("自定义发送失败回调");
    }

}
